#!/bin/bash
#SBATCH --job-name=MSE6701
#SBATCH --partition=64c512g
#SBATCH -N 1
#SBATCH --ntasks-per-node=4
#SBATCH --output=%j.out
#SBATCH --error=%j.err

. ../0-tools/environment

module load intel-oneapi-compilers/2021.4.0
module load intel-oneapi-mpi/2021.4.0
module load intel-oneapi-mkl/2021.4.0

ulimit -s unlimited

# Step 1: static of unrelaxed
rm -rf INCAR POSCAR
cp POSCAR.ini POSCAR
ln -s INCAR.static INCAR
mpirun ${VASP}
mv OUTCAR OUTCAR.01

# Step 2: relaxation
rm -rf INCAR
ln -s INCAR.relax INCAR
mpirun ${VASP}
mv OUTCAR OUTCAR.02

# Step 3: static of relaxed
rm -rf INCAR
ln -s INCAR.static INCAR
cp CONTCAR POSCAR
mpirun ${VASP}
mv OUTCAR OUTCAR.03
